package org.bbsoft.catchme.model.entities;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;

@Embeddable
public class Location {

	@OneToOne
	@JoinColumn(name="POSTAL_ADDRESS", referencedColumnName="POSTAL_ADDRESS_ID")
	private PostalAddress address;

	@Column(name = "LATITUDE", nullable = false)
	@Basic(optional = false)
	private Double latitude;

	@Column(name = "LONGITUDE", nullable = false)
	@Basic(optional = false)
	private Double longitude;

	public PostalAddress getAddress() {
		return address;
	}

	public void setAddress(PostalAddress address) {
		this.address = address;
	}

	public Double getLatitude() {
		return latitude;
	}

	public void setLatitude(Double latitude) {
		this.latitude = latitude;
	}

	public Double getLongitude() {
		return longitude;
	}

	public void setLongitude(Double longitude) {
		this.longitude = longitude;
	}

}
